Add step for ProductCodeSubmitLogInfo

Brightcells 7 years ago
parent
commit
8156d5d0ee
3 changed files with 22 additions and 1 deletions
  1. 1 1
      product/admin.py
  2. 19 0
      product/migrations/0005_productcodesubmitloginfo_step.py
  3. 2 0
      product/models.py

+ 1 - 1
product/admin.py

@@ -21,7 +21,7 @@ class ProductInfoAdmin(admin.ModelAdmin):
21 21
 class ProductCodeSubmitLogInfoAdmin(admin.ModelAdmin):
22 22
     list_display = ('model_id', 'model_name', 'mount', 'code', 'franchiser_id', 'clerk_id', 'consumer_name', 'consumer_sex', 'consumer_age', 'consumer_phone', 'status', 'created_at', 'updated_at')
23 23
     search_fields = ('model_id', 'model_name', 'code', 'consumer_name', 'consumer_phone')
24
-    list_filter = ('mount', 'franchiser_id', 'consumer_sex', 'status')
24
+    list_filter = ('step', 'mount', 'franchiser_id', 'consumer_sex', 'status')
25 25
 
26 26
 
27 27
 admin.site.register(ProductModelInfo, ProductModelInfoAdmin)

+ 19 - 0
product/migrations/0005_productcodesubmitloginfo_step.py

@@ -0,0 +1,19 @@
1
+# -*- coding: utf-8 -*-
2
+from __future__ import unicode_literals
3
+
4
+from django.db import models, migrations
5
+
6
+
7
+class Migration(migrations.Migration):
8
+
9
+    dependencies = [
10
+        ('product', '0004_auto_20170630_0232'),
11
+    ]
12
+
13
+    operations = [
14
+        migrations.AddField(
15
+            model_name='productcodesubmitloginfo',
16
+            name='step',
17
+            field=models.IntegerField(default=1, help_text='\u63d0\u4ea4\u6b65\u9aa4', verbose_name='step', db_index=True),
18
+        ),
19
+    ]

+ 2 - 0
product/models.py

@@ -66,6 +66,8 @@ class ProductInfo(CreateUpdateMixin, SexChoicesMixin):
66 66
 
67 67
 
68 68
 class ProductCodeSubmitLogInfo(CreateUpdateMixin, SexChoicesMixin):
69
+    step = models.IntegerField(_(u'step'), default=1, help_text=u'提交步骤', db_index=True)
70
+
69 71
     model_id = models.CharField(_(u'model_id'), max_length=255, blank=True, null=True, help_text=u'型号唯一标识', db_index=True)
70 72
     model_name = models.CharField(_(u'model_name'), max_length=255, blank=True, null=True, help_text=u'型号名称', db_index=True)
71 73
     mount = models.CharField(_(u'mount'), max_length=255, blank=True, null=True, help_text=u'卡口', db_index=True)